<%--
  Created by IntelliJ IDEA.
  User: lirance
  Date: 16/3/17
  Time: 下午1:16
  To change this template use File | Settings | File Templates.
  显示用户以及服务列表
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <%-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"/>--%>
    <title>用户服务推荐系统主页</title>

    <link href="css/font-awesome.min.css" rel="stylesheet">

    <link rel="stylesheet" href="css/style.css" media="screen" type="text/css"/>
    <link href="./css/bootstrap.css" rel="stylesheet"/>
    <link href="./css/amber-style.css" rel="stylesheet"/>
    <style type="text/css"></style>
    <script src="./js/echarts-all.js"></script>
    <script src="./js/amber-script.js"></script>
    <script src="./js/amber-chart.js"></script>

    <script src='js/jquery.js'></script>

    <script src="js/index.js"></script>
    <script src="./js/jquery-2.2.3.js"></script>
    <script src="./js/bootstrap.min.js"></script>
    <script src="./js/bootstrap.js"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="./css/bootstrap-theme.css">
</head>
<body>
<header>
    <div class="container">
        <p class="header-con-p">基于协同过滤的服务推荐系统</p>
    </div>
</header>
<div class="content">
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="col-md-12">
                <div class="row-fluid"><%--
                <div class="col-md-3">
                    <div class="accordion" id="accordion-821083">
                        <div class="accordion-group ">
                            <div class="accordion-heading">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion"
                                   href="#accordion-element-289331">Qos数据信息管理</a>
                            </div>
                            <div id="accordion-element-289331" class="accordion-body in collapse">
                                <div class="accordion-inner">
                                    <a href="#panel-425252" data-toggle="tab" style="color:black">
                                        用户信息管理
                                    </a>
                                </div>
                                <div class="accordion-inner">
                                    <a href="#panel-316496" data-toggle="tab" style="color:black">
                                        web服务信息
                                    </a>

                                </div>
                                <div class="accordion-inner">
                                    <a href="#panel-316497" data-toggle="tab" style="color:black">
                                        用户-web服务调用信息
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="accordion-group ">
                            <div class="accordion-heading">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion"
                                   href="#accordion-element-691493">Web服务聚类</a>
                            </div>
                            <div id="accordion-element-691493" class="accordion-body collapse">
                                <div class="accordion-inner">
                                    <a href="servicecluster.jsp" data-toggle="tab" style="color:black">
                                        Web服务层次聚类
                                    </a>
                                </div>
                                <div class="accordion-inner">
                                    <a href="servicecluster.jsp" data-toggle="tab" style="color:black">
                                        聚类结果分析
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="accordion-group ">
                            <div class="accordion-heading">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion"
                                   href="#accordion-element-691494">Qos预测</a>
                            </div>
                            <div id="accordion-element-691494" class="accordion-body collapse">
                                <div class="accordion-inner">
                                    <a href="Qos.jsp" data-toggle="tab" style="color:black">
                                        用户相似度分析
                                    </a>
                                </div>
                                <div class="accordion-inner">
                                    <a href="Qos.jsp" data-toggle="tab" style="color:black">
                                        Qos预测
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="accordion-group ">
                            <div class="accordion-heading">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion"
                                   href="#accordion-element-691495">预测结果评估</a>
                            </div>
                            <div id="accordion-element-691495" class="accordion-body  collapse">
                                <div class="accordion-inner">
                                    <a href="result.jsp" data-toggle="tab" style="color:black">
                                        MAE评估
                                    </a>
                                </div>
                                <div class="accordion-inner">
                                    <a href="result.jsp" data-toggle="tab" style="color:black">
                                        RMSE评估
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <script type="text/javascript">
                        $(function () {
                            $('#accordion-element-289331').on('show.bs.collapse', function () {
                                window.location.href = 'getListsAction';
                            })
                            $('#accordion-element-691493').on('show.bs.collapse', function () {
                                window.location.href = 'getClustersAction';
                            })
                            $('#accordion-element-691494').on('show.bs.collapse', function () {
                                window.location.href = 'qosAction.action';
                            })
                            $('#accordion-element-691495').on('show.bs.collapse', function () {
                                window.location.href = 'result.jsp';
                            })
                        });
                    </script>

                </div>--%>
                    <div class="col-md-3">
                        <div class="panel-group" id="accordion-821083" role="tablist" aria-multiselectable="true">
                            <div class="panel panel-default ">
                                <div class="panel-heading" role="tab" id="headingOne">
                                    <h4 class="panel-title">
                                        <a role="button" data-toggle="collapse" data-parent="#accordion"
                                           href="#accordion-element-289331" aria-expanded="true"
                                           aria-controls="collapseOne">
                                            Qos数据信息管理
                                        </a>
                                    </h4>
                                </div>
                                <div id="accordion-element-289331" class="panel-collapse collapse in" role="tabpanel"
                                     aria-labelledby="headingOne">
                                    <div class="panel-body">
                                        <div class="panel-inner">
                                            <a href="#panel-425252" data-toggle="tab" style="color:black">
                                                用户信息管理
                                            </a>
                                        </div>
                                        <div class="panel-inner">
                                            <a href="#panel-316496" data-toggle="tab" style="color:black">
                                                web服务信息
                                            </a>

                                        </div>
                                        <div class="panel-inner">
                                            <a href="#panel-316497" data-toggle="tab" style="color:black">
                                                用户-web服务调用信息
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="panel panel-default ">
                                <div class="panel-heading" role="tab" id="headingTwo">
                                    <h4 class="panel-title">
                                        <a role="button" data-toggle="collapse" data-parent="#accordion"
                                           href="#accordion-element-691493" aria-expanded="true"
                                           aria-controls="collapseTwo">
                                            Web服务聚类
                                        </a>
                                    </h4>
                                </div>
                                <div id="accordion-element-691493" class="panel-collapse collapse " role="tabpanel"
                                     aria-labelledby="headingTwo">
                                    <div class="panel-body">
                                        <div class="panel-inner">
                                            <a href="#panel-425252" data-toggle="tab" style="color:black">
                                                Web服务层次聚类
                                            </a>
                                        </div>
                                        <div class="panel-inner">
                                            <a href="#panel-316496" data-toggle="tab" style="color:black">
                                                聚类结果分析
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="panel panel-default ">
                                <div class="panel-heading" role="tab" id="headingThree">
                                    <h4 class="panel-title">
                                        <a role="button" data-toggle="collapse" data-parent="#accordion"
                                           href="#accordion-element-691494" aria-expanded="true"
                                           aria-controls="collapseThree">
                                            Qos预测
                                        </a>
                                    </h4>
                                </div>
                                <div id="accordion-element-691494" class="panel-collapse collapse " role="tabpanel"
                                     aria-labelledby="headingThree">
                                    <div class="panel-body">
                                        <div class="panel-inner">
                                            <a href="#panel-425252" data-toggle="tab" style="color:black">
                                                用户相似度分析与Qos预测
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="panel panel-default ">
                                <div class="panel-heading" role="tab" id="headingFour">
                                    <h4 class="panel-title">
                                        <a role="button" data-toggle="collapse" data-parent="#accordion"
                                           href="#accordion-element-691495" aria-expanded="true"
                                           aria-controls="collapseFour">
                                            预测结果评估
                                        </a>
                                    </h4>
                                </div>
                                <div id="accordion-element-691495" class="panel-collapse collapse " role="tabpanel"
                                     aria-labelledby="headingFour">
                                    <div class="panel-body">
                                        <div class="panel-inner">
                                            <a href="#panel-425252" data-toggle="tab" style="color:black">
                                                λ与预测结果的关系
                                            </a>
                                        </div>
                                        <div class="panel-inner">
                                            <a href="#panel-316496" data-toggle="tab" style="color:black">
                                                top-K与预测结果的关系
                                            </a>

                                        </div>
                                        <div class="panel-inner">
                                            <a href="#panel-316497" data-toggle="tab" style="color:black">
                                                聚类数目与预测结果的关系
                                            </a>
                                        </div>
                                        <div class="panel-inner">
                                            <a href="#panel-316498" data-toggle="tab" style="color:black">
                                                数据多少与预测结果的关系
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <script type="text/javascript">
                                $(function () {
                                    $('#accordion-element-289331').on('show.bs.collapse', function () {
                                        window.location.href = 'getListsAction';
                                    })
                                    $('#accordion-element-691493').on('show.bs.collapse', function () {
                                        window.location.href = 'getClustersAction';
                                    })
                                    $('#accordion-element-691494').on('show.bs.collapse', function () {
                                        window.location.href = 'qosAction.action';
                                    })
                                    $('#accordion-element-691495').on('show.bs.collapse', function () {
                                        window.location.href = 'result.jsp';
                                    })
                                });
                            </script>
                        </div>
                    </div>
                    <div class="col-md-9">
                        <div class="tabbable" id="tabs-191694">
                            <ul class="nav nav-tabs">
                            </ul>
                            <div class="tab-content">
                                <div class="tab-pane active" id="panel-425252">
                                    <div class="row-fluid" style="overflow:scroll; height:600px; width: 800px">
                                        <br/><br/>
                                        <div class="col-md-12">
                                            <%--<div class="col-md-2">
                                                <button type="submit" onclick="window.location.href='searchUser.action'"
                                                        class="btn" contenteditable="true">搜索
                                                </button>
                                            </div>
                                            <div class="col-md-8">
                                                <form class="form-search form-inline" method="post">
                                                    <input class="input-medium search-query" name="uid" id="uid"
                                                           type="text">

                                                    <button type="submit" class="btn"
                                                            onclick="window.location.href='searchUser.action'"
                                                            contenteditable="true">
                                                        按id查找
                                                    </button>
                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                                                    <input class="input-medium search-query" name="uip" id="uip"
                                                           type="text">
                                                    <button type="submit"
                                                            onclick="window.location.href='searchUser.action'"
                                                            class="btn" contenteditable="true">
                                                        按ip查找
                                                    </button>
                                                </form>
                                            </div>

                                            <div class="col-md-2">
                                                <button type="submit"
                                                        onclick="window.location.href='getListsAction.action'"
                                                        class="btn" contenteditable="true">返回
                                                </button>
                                            </div>--%>
                                            <table class="table table-bordered table-hover">
                                                <thead>
                                                <tr>
                                                    <th>
                                                        userID
                                                    </th>
                                                    <th>
                                                        IP
                                                    </th>
                                                    <th>
                                                        Domain Name
                                                    </th>
                                                    <th>
                                                        Country Name
                                                    </th>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                <%
                                                    int id = 0;
                                                    String kinds = null;

                                                %>
                                                <s:iterator var="users" value="userlist">
                                                    <%
                                                        id++;
                                                        if (id % 5 == 0) kinds = "info";
                                                        else if (id % 5 == 1) kinds = "danger";
                                                        else if (id % 5 == 2) kinds = "warning";
                                                        else if (id % 5 == 3) kinds = "success";
                                                        else if (id % 5 == 4) kinds = "";
                                                    %>
                                                    <tr class="<%=kinds%>">
                                                        <td>
                                                        <span>
                                                            <a href="searchUser.action?uid=${users.uId}"
                                                               style="color:black">
                                                                    ${users.uId}
                                                            </a>
                                                        </span>
                                                        </td>
                                                        <td>
                                                            <a href="searchUser.action?uip=${users.ip}"
                                                               style="color:black">
                                                                    ${users.ip}
                                                            </a>
                                                        </td>
                                                        <td>
                                                            <span>${users.dName}</span>
                                                        </td>
                                                        <td>
                                                            <span>${users.cName}</span>
                                                        </td>
                                                    </tr>
                                                </s:iterator>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <div class="tab-pane" id="panel-316496">
                                    <div class="row-fluid" style="overflow:scroll; height:600px; width: 800px">
                                        <br/><br/>
                                        <div class="col-md-12">
                                           <%-- <div class="col-md-2">
                                                <button type="submit" onclick="window.location.href='searchWeb.action'"
                                                        class="btn" contenteditable="true">搜索
                                                </button>
                                            </div>
                                            <div class="col-md-8">
                                                <form class="form-search form-inline" method="post">
                                                    <input class="input-medium search-query" name="wid" id="wid"
                                                           type="text">

                                                    <button type="submit" class="btn"
                                                            onclick="window.location.href='searchWeb.action'"
                                                            contenteditable="true">
                                                        按id查找
                                                    </button>
                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                                                    <input class="input-medium search-query" name="wname" id="wname"
                                                           type="text">
                                                    <button type="submit"
                                                            onclick="window.location.href='searchweb.action'"
                                                            class="btn" contenteditable="true">
                                                        按WSname查找
                                                    </button>
                                                </form>
                                            </div>

                                            <div class="col-md-2">
                                                <button type="submit"
                                                        onclick="window.location.href='getListsAction.action'"
                                                        class="btn" contenteditable="true">返回
                                                </button>
                                            </div>--%>
                                            <table class="table table-bordered table-hover">
                                                <thead>
                                                <tr>
                                                    <th>
                                                        WebServiceId
                                                    </th>

                                                    <th>
                                                        WebService Name
                                                    </th>
                                                    <th>
                                                        Provider Name
                                                    </th>
                                                    <th>
                                                        Location
                                                    </th>

                                                    <th>
                                                        WSDL Address
                                                    </th>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                <%
                                                    id = 0;
                                                %>
                                                <s:iterator var="service" value="serviceList">
                                                    <%
                                                        id++;
                                                        if (id % 5 == 0) kinds = "info";
                                                        else if (id % 5 == 1) kinds = "danger";
                                                        else if (id % 5 == 2) kinds = "warning";
                                                        else if (id % 5 == 3) kinds = "success";
                                                        else if (id % 5 == 4) kinds = "";
                                                    %>
                                                    <tr class="<%=kinds%>">
                                                        <td>
                                                        <span>
                                                        <a href="searchWeb.action?wsid=${service.wsId}"
                                                           style="color:black">${service.wsId}
                                                        </a>
                                                        </span>
                                                        </td>

                                                        <td>
                                                        <span>
                                                            <a href="searchWeb.action?wname=${service.wsId}"
                                                               style="color:black">${service.wsName}
                                                            </a>
                                                        </span>
                                                        </td>
                                                        <td>
                                                            <span>${service.proName}</span>
                                                        </td>
                                                        <td>
                                                            <span>${service.location}</span>
                                                        </td>

                                                        <td>
                                                            <span>${service.wsAddress}</span>
                                                        </td>
                                                    </tr>
                                                </s:iterator>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <div class="tab-pane" id="panel-316497">
                                    <div class="row-fluid" style="overflow:scroll; height:600px; width: 800px;">
                                        <br/><br/>
                                        <div class="col-md-12">
                                           <%-- <div class="col-md-2">
                                                <button type="submit"
                                                        onclick="window.location.href='getServiceCalls.action'"
                                                        class="btn" contenteditable="true">搜索
                                                </button>
                                            </div>
                                            <div class="col-md-8">
                                                <form class="form-search form-inline" method="post">
                                                    uid:<input class="input-medium search-query" name="uid1" id="uid1"
                                                               type="text">

                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                                                    wsid:<input class="input-medium search-query" name="wsid" id="wsid"
                                                                type="text">
                                                    <button type="submit"
                                                            onclick="window.location.href='getServiceCalls.action'"
                                                            class="btn" contenteditable="true">
                                                        按uid和wsid查找
                                                    </button>
                                                </form>
                                            </div>

                                            <div class="col-md-2">
                                                <button type="submit"
                                                        onclick="window.location.href='getListsAction.action'"
                                                        class="btn" contenteditable="true">返回
                                                </button>
                                            </div>--%>
                                            <table class="table table-bordered table-hover">
                                                <thead>
                                                <tr>
                                                    <th>
                                                        UserId
                                                    </th>
                                                    <th>
                                                        WebServiceId
                                                    </th>

                                                    <th>
                                                        rtt
                                                    </th>
                                                   <%-- <th>
                                                        dataSize
                                                    </th>--%>
                                                    <th>
                                                        calledCount
                                                    </th>
                                                   <%-- <th>
                                                        resCode
                                                    </th>

                                                    <th>
                                                        resMessage
                                                    </th>--%>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                <%
                                                    id = 0;
                                                %>
                                                <s:iterator var="servicecal" value="servicecall">
                                                    <%
                                                        id++;
                                                        if (id % 5 == 0) kinds = "info";
                                                        else if (id % 5 == 1) kinds = "danger";
                                                        else if (id % 5 == 2) kinds = "warning";
                                                        else if (id % 5 == 3) kinds = "success";
                                                        else if (id % 5 == 4) kinds = "";
                                                    %>
                                                    <tr class="<%=kinds%>">
                                                        <td>
                                                        <span>
                                                        ${servicecal.uId}
                                                        </span>
                                                        </td>

                                                        <td>
                                                        <span>
                                                            ${servicecal.wsId}
                                                        </span>
                                                        </td>
                                                        <td>
                                                            <span>${servicecal.rtt}</span>
                                                        </td>
                                                       <%-- <td>
                                                            <span>${servicecal.dataSize}</span>
                                                        </td>--%>

                                                        <td>
                                                            <span>${servicecal.frequency}</span>
                                                        </td>
                                                        <%--<td>
                                                            <span>${servicecal.resCode}</span>
                                                        </td>
                                                        <td>
                                                            <span>${servicecal.resMessage}</span>
                                                        </td>--%>
                                                    </tr>
                                                </s:iterator>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>